/*
 *  cylk_basicUtilities.h
 *  cylk
 *
 *	Math utility functions for the AFNI cylk plugin.
 * 
 *  These should have no dependencies except for standard library 
 *  and lapack (which is in OS X's vecLib framework).
 *
 *  Created by Benjamin Heasly on 7/14/09.
 *  Copyright 2009 __MyCompanyName__. All rights reserved.
 *
 */
#ifndef CYLK_BASICUTILITIES
#define CYLK_BASICUTILITIES

#include <stdio.h>
#include <math.h>
#include <vecLib/vecLib.h>

int fitLineToXYPoints					(float *Y, float *X, int *pointMask, int nPoints, float *fits);
void multiply3By3MatrixATimesB			(float *A, float *B);
float meanOfValues						(float *vals, int nVals);
float meanOfAbsoluteValues				(float *vals, int nVals);
float yInterceptOfXYPointsGivenSlope	(float *Y, float *X, int *pointMask, float slope, int nPoints);
float rawMomentOfXToPAndYToQ			(float *X, int p, float dx, float *Y, int q, float dy, int nSample);

#endif